import configDev from './config-dev.js';
import configProd from './config-prod.js';

const NODE_ENV = process.env.NODE_ENV;
console.log("当前运行环境：", NODE_ENV);
// 是否开发环境
const IS_DEV = NODE_ENV ==='development';

const config = IS_DEV ? configDev : configProd;

const envConfig = {
	// 公共配置
	
	// 默认背景音索引
	defaultBgmIndex: 0,
	// 背景音乐数据列表
	bgMusicData: [
		{name: '古风战争', url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-5f226687-3f2d-48b3-b92b-9f52a49e3f4e/8fad4797-d953-4a67-b58f-8dca9410343a.mp3'},
		{name: '武侠游戏', url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-5f226687-3f2d-48b3-b92b-9f52a49e3f4e/54e8befc-baea-43cd-846c-e82b8779f9bd.mp3'},
		{name: '休闲战斗', url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-5f226687-3f2d-48b3-b92b-9f52a49e3f4e/1f092cec-f828-4230-a59b-febbda27ff4e.mp3'},
		{name: '飞机大战', url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-5f226687-3f2d-48b3-b92b-9f52a49e3f4e/2a63adf5-69b9-42a5-a9e2-93e5e4c21dbe.mp3'},
	],
	//音效
	audios: {
		// 点击音效
		"click": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-5f226687-3f2d-48b3-b92b-9f52a49e3f4e/02009e02-3919-4c38-88e2-d4366b8f2a5d.mp3",
		// 成功音效
		"success": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-5f226687-3f2d-48b3-b92b-9f52a49e3f4e/2049f8ce-d012-458c-ac89-7ed9429ae964.mp3",
		// 错误音效
		"fail": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-5f226687-3f2d-48b3-b92b-9f52a49e3f4e/388aed3b-d130-42f8-9879-01981bdfde82.mp3",
	},
	// 背景图
	bgImg: {
		// 主背景图
		main: "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-5f226687-3f2d-48b3-b92b-9f52a49e3f4e/111d2c3d-9e5e-422e-a0a7-b6c54bc11e8a.jpg",
		// 关卡默认图
		passDef: "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-5f226687-3f2d-48b3-b92b-9f52a49e3f4e/1f65049d-4d91-4800-a750-ee4d617f55f6.jpg",
	},
	
	...config
};

// 挂载到uni
uni.envConfig = envConfig;

export default envConfig;
